﻿using PetaPoco;
using PmSoft;
using PmSoft.Caching;
using System.ComponentModel;

namespace Modules
{
    /// <summary>
    /// 项目保证金支出信息
    ///</summary>
    [TableName("project_guarantee_expenditure")]
    [Description("项目保证金支出记录")]
    [PrimaryKey("id", AutoIncrement = true)]
    [CacheSetting(true)]
    [Serializable]
    public class ProjectGuaranteeExpenditure : IEntity
    {
        /// <summary>
        ///
        ///</summary>
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 项目Id
        ///</summary>
        [Column("project_id")]
        public int ProjectId { get; set; }

        /// <summary>
        /// 支出编号
        ///</summary>
        [Column("code")]
        public string Code { get; set; }

        /// <summary>
        /// 保证金缴纳信息Id
        ///</summary>
        [Column("guarantee_payment_id")]
        public int? GuaranteePaymentId { get; set; }

        /// <summary>
        /// 动用通知书文号
        ///</summary>
        [Column("notification_letter")]
        public string NotificationLetter { get; set; }

        /// <summary>
        /// 保函（险）单号
        ///</summary>
        [Column("guarantee_letter_no")]
        public string GuaranteeLetterNo { get; set; }

        /// <summary>
        /// 收支金额
        ///</summary>
        [Column("amount")]
        public decimal? Amount { get; set; }

        /// <summary>
        /// 收支日期
        ///</summary>
        [Column("pay_date")]
        public DateTime? PayDate { get; set; }

        /// <summary>
        /// 创建人
        ///</summary>
        [Column("creator")]
        public string Creator { get; set; }

        /// <summary>
        /// 创建时间
        ///</summary>
        [Column("create_time")]
        public DateTime? CreateTime { get; set; }

        #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return this.Id; } }

        #endregion IEntity 成员
    }
}